<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/reportSumation">
	<html>
<head />
<body>
	   <table border="1" width="100%">
		  <xsl:apply-templates select="subReport"></xsl:apply-templates>
		</table>
		</body>
</html>
	</xsl:template>
	
	<xsl:template match="subReport">
            <xsl:choose>
	            <xsl:when test="count(subReport) = 0">
	                <tr><td><xsl:value-of select="concat(@group_title,': ',@grouping )"/></td><td><xsl:value-of select="total_time" /></td></tr>
	            </xsl:when>
	            <xsl:otherwise>
	               <tr><td colspan="2"><h3><xsl:value-of select="concat(@group_title,': ',@grouping )"/></h3></td></tr>
	               <xsl:apply-templates select="subReport"></xsl:apply-templates>
	               <tr><td>Total :: Tasks </td><td><xsl:value-of select="total_time" /> :: <xsl:value-of select="total_tasks" /></td></tr>
	            </xsl:otherwise>
            </xsl:choose>
	</xsl:template>
	

</xsl:stylesheet>